package com.cashoutgaming.shared.game;

import com.cashoutgaming.client.common.images.CommonToolImages;
import com.google.gwt.resources.client.ImageResource;

public enum GameType {

	COD_BO2("COD_BO2", "Black Ops 2"), COD_GHOSTS("COD_GHOSTS", "Ghosts"), COD_AW("COD_AW", "Advanced Warfare"), TITAN("TITAN", "Titan Fall");;

	private String abrv = "";
	private String full = "";

	private GameType(final String abrv, final String full) {
		this.abrv = abrv;
		this.full = full;
	}

	public String getAbrv() {
		return abrv;
	}
	
	public String getFull() {
		return full;
	}
	
	public ImageResource getIcon() {
		switch(this){
		case COD_BO2:
			return CommonToolImages.INSTANCE.getBO2Logo();
		case COD_GHOSTS:
			return null;
		case COD_AW:
			return null;
		case TITAN:
			return null;
		}
		
		return null;
	}

	public static GameType getEnumForType(final String abrv) {
		for (final GameType theEnum : GameType.values()) {
			if (theEnum.getAbrv().equalsIgnoreCase(abrv)) {
				return theEnum;
			}
		}
		return null;
	}
}
